from base.mybase import Tools


class login_model(Tools):
    # 定义路径
    path = '/user/login'

    # 发送注册请求
    def login_action(self, usr, pwd, check='1234'):
        mydata = {
            'username': usr,
            'password': pwd,
            'checkcode': check,
        }
        res = self.huihua.post(url=self.hosturl + self.path, data=mydata)
        return res.json()

# import requests
# s = requests.session()
# reg = reg_model(huihua=s)
# msg = reg.reg_action(usr='Theshy',pwd='haha123',cpwd='haha123',email='theshy@qq.com')
# print(msg)